import request from '@/utils/request'

export function getrole(params) {
  return request({
    url: '/sysrole/queryrole',
    method: 'get',
    params
  })
}

export function zhcx(data) {
  return request({
      url: '/sysrole/zhcx',
      method: 'post',
      data
  })
}



export function deleteRole(roleId) {
  return request({
      url: '/sysrole/deleteRole/' + roleId,
      method: 'delete',
      params: { roleId }
  })
}

export function saveSysrole(data) {
  return request({
      url: '/sysrole/saveRole',
      method: 'post',
      data
  })
}

export function saveSysroleMenu(roleId,menuId) {
  return request({
      url: '/sysrole/saveRoleMenu',
      method: 'post',
      params:{roleId,menuId}
  })
}

export function updateRole(data) {
  return request({
      url: '/sysrole/updateRole',
      method: 'put',
      data
  })
}


